<!DOCTYPE html>
<html>
<head>
<title>用户vip等级管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<#include "../../../../include/resources.html">

<script type="text/javascript">
	var dataGrid;
	var winWidth = 800;
	var winHeight = 300;
	var addTitle = "添加vip等级";
	var addUrl =  "/modules/user/vip/addVipLevelPage.html";
	var addWinParmeters = "'{0}','"+addTitle+"',"+winWidth+","+winHeight+",'"+addUrl+"'";
	var editTitle = "编辑vip等级";
    var editUrl =  "/modules/user/vip/updateVipLevelPage.html";
    var editWinParmeters = "'{0}','"+editTitle+"',400,350,'"+editUrl+"'";
    var delUrl = "/modules/user/vip/deleteVipLevel.html";
	$(function() {
		dataGrid = $('#dataGrid').datagrid({
			url : 'vipLevelList.html',
			fit : true,
			fitColumns : true,
			border : false,
			pagination : true,
			idField : 'id',
			pageSize : pageSize,
			pageNums :1,
			pageList : pageList,
			sortName : 'id',
			sortOrder : 'asc',
			checkOnSelect : false,
			selectOnCheck : false,
			nowrap : false,
			singleSelect:true,
			columns : [ [
			{ field: 'id', title: '编号', width: 50 },
			{ field: 'level', title: '等级', width: 50},
			{ field: 'growthValue', title: '所需成长值', width: 80},
			{ field: 'growthLimitValue', title: '成长封顶值', width: 80},
			{ field: 'extraRate', title: '额外收益率', width: 80},
			{ field: 'giftMoney', title: '赠送红包金额', width: 80},
			{ field: 'addTime', title: '添加时间', width: 80,  
          	  	formatter: function(value,row,index){
          	  		return getLocalTime(value,4);
				}  
            },
			{	field : 'action',
				title : '操作',
				width :100,
				fixed:true,
				formatter : function(value, row, index) {
					var str = '';
					str += '<dl>';
                    str += '<dt><a href="javascript:void(0);" onclick="$.fn.dataGridOptions.editFun('+row.id+',editTitle,winWidth,winHeight,editUrl);" title="编辑vip等级">编辑</a><i class="iconfont">&#xe639;</i></dt>';
                    str += '<dd>';
                    str += '<a href="javascript:void(0);" onclick="$.fn.dataGridOptions.deleteFun('+row.id+',delUrl);" title="删除vip等级">删除</a>';
                    str += '</dd>';
                    str +=  '</dl>'
					return str;
				}
			} 
            ]],
			toolbar : '#toolbar',
			onLoadSuccess : function() {
				$('#searchForm table').show();
				parent.$.messager.progress('close');
			}
		});
	});

</script>
</head>
<body style="padding:0 20px;" >
	<div class="easyui-layout" data-options="fit : true,border : false">
		<div data-options="region:'north',border:false,collapsible:false" id="searchBox">
            <div class="sRight">
				<a onclick="$.fn.dataGridOptions.addFun(-1,addTitle,winWidth,winHeight,addUrl);" href="javascript:void(0);" class="addBtn sBtn"><i class="iconfont">&#xe629;</i>添加</a>					
            </div>
		</div>
		<div data-options="region:'center'" style="margin-top:30px;padding-bottom:30px;">
			<table id="dataGrid"></table>
		</div>
	</div>
</body>
</html>
<script src="${theme_dir}/js/search.js"></script>